package com.chengke.novel.common.auth;


import com.chengke.novel.cacheManager.UserInfoCacheManager;
import com.chengke.novel.common.exception.BusinessException;
import com.chengke.novel.common.utils.JwtUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 前台门户系统 认证授权策略
 * @Author CK
 * @Date 2023/3/20
 */


@Component
@RequiredArgsConstructor
public class FrontAuthStrategy implements AuthStrategy {

    private final JwtUtils jwtUtils;

    private final UserInfoCacheManager userInfoCacheManager;

    @Override
    public void auth(String token, String requestUri) throws BusinessException {
        // 统一账号认证
        authSSO(jwtUtils, userInfoCacheManager, token);
    }

}